When a foreign key is added to MySQL, the following error occurs: 1215 Cannot add the foreign key constraint, 1215 constraint
Preface
This article mainly covers ERROR 1215 (HY000): Cannot add foreign key constraint when creating a table, if you are interested in the same problem, refer.
I. Question proposal
Create two tables:
Product: product table
Sealer: Suppli
Perhaps many friends on the Internet have also seen a lot about the difference between the brand graphics card, but with the rapid development of computer hardware, a lot of accurate graphics series difference is not so detailed, resulting in many friends do not have a unified standard.
In view of the above situation, the small compiled specially looked up the common graphics card each brand, has studied each graphics card brand corresponding has which series, summarizes the writte
Question Link
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1215
The question should be slightly changed. It is too difficult to think about it. If you have an idea, you can try it to make progress,
At first, I directly sought the factor, sum, and undoubtedly timed out. When is the question so easy? Obviously not,
Flexible. Just a little bit, you can use AC. Everything is in the code.
Code timeout
# Include Int main (void){Int t, n, I, J, K, L;Scanf
LightOJ 1215 Finding LCM (number theory), lightojlcm
It is known that LCM (a, B, c) = L and c.
After expanding the number into the form of prime factor Product
GCD (a, B) is a small index of the common prime factor of a and B.
LCM (a, B) is a larger index of all prime factors of a and B.
So that m = LCM (a, B) then the problem is converted to finding the minimum c to meet LCM (m, c) = L
Then the smallest c is the prime factor in L which is not in m an
1215:i wanna be A palindrome
time limit: 2 Sec
memory limit: MB
submitted by: 148
resolution: 22
Submitted State [Discussion Version]
Title DescriptionGives a string that consists of lowercase letters only. Find out if you just delete one of the letters and the string becomes a palindrome.InputThe input first line is an integer t, which indicates that there is a T Group of data. one row per group of data, each containing a
Asus Ling Yiu 3 Notebook image, the main lightweight, designed to match the Apple MacBook Notebook.
Lightweight design is undoubtedly Asus Ling Yiu 3 Notebook's biggest selling point, and thin design the most prominent bright spot is Yan value and portable, the following through a detailed look at the details of the picture.
1/15
ASUS
do Sicily 1215 out of the dungeon this problem, has been restrict function, are almost collapsed. The last discovery is a memory leak, that is, something new comes out without a timely delete result. in the breadth of the first search, each neighbor to new out some nodes, some nodes have been visited and then I directly ignore them, in fact, you have to delete them, and the pop out of a node, after processing the neighbor to delete the node Put a code
Tags: ima ann creat ror test different incr a forERROR 1215 (HY000): Cannot add foreign KEY constraint Recently encountered this error in the construction of the table, and then found the next find a solution, record: Two tables were originally to be built: CREATE TABLE department (
ID int,
name varchar)
;
CREATE TABLE employee (
ID int primary key auto_increment,
name varchar,
sex enum (' Male ', ' female ') not Null default ' Male ', age
int,
dep
time limit: 1 sspace limit: 128000 KBtitle level: Golden GoldTitle Description Description n integers are known to x1,x2,..., xn, and an integer k (k
3+7+12=22 3+7+19=29 7+12+19=38 3+12+19=34.
Now, ask you to figure out how many kinds of numbers are in total.
For example, in the above example, there is only one and a prime number: 3+7+19=29).
Enter a description input Description Keyboard input, in the form of:N, K (1
X1,X2,...,XN (1outputs description output Description S
natural numberN(N>1) of allPrime NumberOne of the methods. It is said to be the eratosthenes of ancient Greece (Eratosthenes, ca. BC274~194years) invented, also known as Eratosthenes sieve. The specific practice is: firstNa natural number is arranged in order. 1not prime, nor composite, to be crossed. Second number2is the prime number left, and the2all the back can be2The numbers are divided evenly. 2the first number that was not crossed at the back was3, put3stay, and then put3all the back can
write a program that would solve such problems.The input consists of one to the data sets, followed by a final line containing only 0. Each data set starts with a line containing only a number n, which is the number of villages, 1 The output is an integer per line for each data set:the minimum cost of aacms per month to maintain a road system that C Onnect all the villages. Caution:a Brute force solution that examines every possible set of roads would not finish within the one minute time limit
All over the hole.Target to build Docker SparkrSmall target rpy2 Fbprophet Python3Pit 1:Rpy2 If Python support is required RSolution: Go to download RPit 2:Ubuntu cannot download latest version of R if directlyApt-get Updateapt-get Install R-base will be downloaded directly to 3.1.1 and Python3 under the RPY2 requirements r-version >= 3.3.xSolution: Https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-16-04-2Pit 3:Gpg:requesting key e084dab9 from HKP server Keyserver.ubun
> 1. Sql--master-data=2 record the location of the binary log at the time of the backup and comment out--single-transaction-a a snapshot for InnoDB but MyISAM still locks the table.4 Import Primary library backup to Slave library5 SynchronizingChange Master to master_host= ' 127.0.0.1 ', master_port =3306,master_user= ' backup ', master_password= ' 123456 ', master_ Auto_position=1;Master_auto_position=1 This option is for the Gtid feature to automatically find Binlog files and locations based
Asus motherboard Bios settings tutorial, Asus motherboard bios tutorial
At present, we are not very familiar with the motherboard in our daily life. Next we will briefly introduce some general settings of the motherboard BIOS. ------ (This article is the default task platform)
First, press the host power button and immediately press the DEL key to enter the CMOS settings (different models of the motherbo
The BIOS, which is fully said to be Rom-bios, is a shorthand for the basic input/output system of read-only memory, which is actually a set of programs that are solidified into a computer to provide the lowest-level, most direct hardware control for the computer. Accurately, the BIOS is a hardware and software program between a "converter" or interface (although it itself is only a program), is responsible for the real-time hardware requirements, and according to the software requirements for th
Previously in other notebooks with USB Stick clone installation WinXP system is very smooth, a variety of hardware drivers can be automatically identified and installed.There is an ASUS (ASUS) X554LP notebook on hand, the original win8.1, used to install a Win7 flagship version.As usual to the system of the home under the Win7 of the ultimate version of the clone file, put to the USB stick boot, the origina
[TOJ 1215] Data Structure exercise questions-merge tables (vector merge), toj1215
Description
It is known that va and vb are non-decreasing ordered linear tables, respectively. va and vb are combined into a new linear table vc, And the vc is still not decreasing order.
In this question, the linear table element is an integer. The maximum length of a linear table is 1000.
Input
There are multiple groups of input data. The number of groups of the fi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.